package com.gamecollection.fish.model.obj;

import com.gamecollection.fish.utils.GameUtils;

import java.awt.*;

/**
 * 背景类
 */
public class Bg extends GameObj {
    
    public Bg() {
        super(0, 0, 1440, 900);
    }
    
    @Override
    public void paintSelf(Graphics g) {
        if (GameUtils.bgimg == null) {
            g.setColor(Color.BLUE);
            g.fillRect(0, 0, 1440, 900);
            GameUtils.drawWord(g, "背景图片加载失败", Color.WHITE, 80, 500, 500);
            return;
        }
        g.drawImage(GameUtils.bgimg, 0, 0, null);
    }
    
    @Override
    public void update() {
        // 背景更新逻辑
    }
} 